﻿Imports System.Windows.Forms

''' <summary>
''' Provides common static functions used by this assembly
''' </summary>
''' <remarks></remarks>
Public NotInheritable Class StringUtilities

#Region " Constructors "
    Private Sub New()
        'private constrcutor to prevent instantiation
    End Sub
#End Region

#Region " Static Methods "

    ''' <summary>
    ''' Converts a string in the RTF format to a pure text format with no special formatting.
    ''' </summary>
    ''' <param name="rtf">String - an RTF codes string.</param>
    ''' <returns>String</returns>
    ''' <remarks></remarks>
    Public Shared Function ConvertRtfToPlainText(ByVal rtf As String) As String
        Using rtb As New RichTextBox
            rtb.Rtf = rtf
            Return rtb.Text
        End Using
    End Function

#End Region

End Class
